home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / search / lsmtool-.6 / lsmtool- / lsmtool-0.6 / termtest.c < prev    next >
C/C++ Source or Header  |  1994-12-28  |  428b  |  27 lines

  1. /*
  2.  * termtest.c -- test terminal stuff for lsmtool
  3.  *
  4.  * Lars Wirzenius
  5.  * "@(#)lsm:termtest.c,v 1.1 1994/12/28 13:06:38 wirzeniu Exp"
  6.  */
  7.  
  8. #include <stdio.h>
  9. #include "term.h"
  10.  
  11. int main(void) {
  12.     int key;
  13.  
  14.     terminit();
  15.     clear();
  16.     move(0, 0);
  17.     printf("Press keys, q quits");
  18.     while ((key = getkey()) != 'q' && key != -1) {
  19.         move(5, 0);
  20.         clrtoeol();
  21.         printf("Keycode = %d", key);
  22.         fflush(stdout);
  23.     }
  24.     termend();
  25.     return 0;
  26. }
  27.